/***************************************************************************
 *   Copyright (C) 2007 by les pandas rouges   *
 *   pouet@pouet   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/


#ifndef SHAPERECOGNIZERTOOL_H
#define SHAPERECOGNIZERTOOL_H

#include <QMainWindow>
#include <QAction>
#include <QMenu>
#include <QToolBar>
#include <QGraphicsView>
#include <QLabel>
#include "shaperecdisplaymanager.h"
#include "myintpoint.h"

class ShapeRecognizerTool:public QMainWindow
{
    Q_OBJECT

public:
    ShapeRecognizerTool();
    ~ShapeRecognizerTool();

private:
    MyIntPoint* points;
    quint16 nbPoints;
    quint16 activePoint;
    QLabel pointInfo;
    ShapeRecDisplayManager dispMana;
    

private slots:
    void open();
    void about();
    void nextPoint();
    void prevPoint();

private:
    void createActions();
    void createMenus();
    void createToolBars();
    void createStatusBar();
    void createDisplay();
    void loadFile(const QString &fileName);
    void closeFile();
    void updatePointInfo();


    QMenu *fileMenu;
    QMenu *editMenu;
    QMenu *helpMenu;
    QToolBar *fileToolBar;
    QAction *openAct;
    QAction *exitAct;
    QAction *aboutAct;
    QAction *aboutQtAct;
    QAction *nextPointAct;
    QAction *prevPointAct;
};

#endif
